@import 'xydark/codeblock.dark.css';
@import 'night/mermaid.dark.css';
@import 'xydark/sourcemode.dark.css';
@import 'xylight.css';

@font-face {
  font-family: puhui;
  src: url('ben/Alibaba-PuHuiTi-Bold.ttf');
}

:root {
  --accented-background-color: #464b5d;
  --light-header-color: #a5a7bd; /* H1-H3 */
  --select-text-bg-color: #295080;
  --accent-color: rgb(120, 124, 136);
  --dark-accent-color: #464b5d;
  --background-color: #0f111a;
  --font-color: #8f93a2;
  --header-color: #eeffff; /* H4-H6 */
  --border-color: #232629;
  --link-color: #6699cc;
  --code-bg-color: #0c1420;
  --hover-bg-color: #050505;
  --control-text-color: var(--font-color);
  --side-bar-bg-color: var(--background-color);
  --control-text-hover-color: var(--header-color);
  --item-hover-text-color: var(--header-color);
  --item-hover-bg-color: var(--hover-bg-color);
  --bg-color: var(--background-color);
  --text-color: var(--font-color);
  --meta-content-color: var(--accent-color);
  --md-char-color: var(--accent-color);
  --window-border: 0px solid rgba(0, 0, 0, 0);
  --active-file-bg-color: var(--hover-bg-color);
  --rawblock-edit-panel-bd: var(--code-background-color);
}

.outline-item:hover {
  background-color: var(--hover-bg-color);
}
/*
#write {
  cursor: -webkit-image-set(url("night/cursor.png") 1x, url("night/cursor@2x.png") 2x) 8 8, auto;
} */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--light-header-color);
}

h2 {
  text-align: center;
  font-weight: bold;
  display: table;
  margin: 2em auto 1em auto;
  padding: 0 1em;
  border-bottom: 2px solid rgb(14,136,235);
}

h3 {
  text-align: center;
  font-weight: bold;
  display: table;
  margin: 2em auto 1em auto;
  padding: 0 1em;
  background: rgb(14,136,235,0.9);
  color: #fff;
}

h4 {
  font-weight: bold;
  margin: 2em 8px 0.75em 0;
  padding-bottom: .1em;
  padding-left: 8px;
  border-left: 4px solid rgb(14,136,235);
}

@media (min-width: 980px) {
  h3.md-focus:before,
  h4.md-focus:before,
  h5.md-focus:before,
  h6.md-focus:before {
    color: var(--dark-accent-color);
  }
}

mark {
  background: #b8b80a;
}

table tr:nth-child(2n),
thead {
  background-color: #141313;
}

sup.md-footnote {
  background-color: var(--code-bg-color);
  color: var(--font-color);
}

.md-before,
.md-after {
  color: var(--dark-accent-color);
}

table tr:nth-child(2n),
thead {
  background-color: #181c2d;
}

.md-url {
  color: #c594c5;
}

/* UI */

footer.ty-footer {
  border-top: none;
}

.typora-sourceview-on #toggle-sourceview-btn {
  background-color: var(--background-color);
}

.cm-s-typora-default .CodeMirror-activeline-background {
  background-color: #181c2d;
}

/* Code */

code,
.md-fences {
  padding: 0.5em;
  background: #0f111a;
  /* border: 1px solid #ccc; */
  padding: 0.1em;
  font-size: 0.9em;
  margin-left: 0.2em;
  margin-right: 0.2em;
}

.md-image > .md-meta {
  color: var(--accent-color);
}

/* right click menu */
.context-menu {
  background-color: #141313;
}

.context-menu.dropdown-menu .divider {
  background-color: #232629;
}

/* focus mode */
.on-focus-mode .md-end-block:not(.md-focus):not(.md-focus-container) * {
  color: #4f525a !important;
}

.on-focus-mode .md-end-block:not(.md-focus) img,
.on-focus-mode .md-task-list-item:not(.md-focus-container) > input {
  opacity: #4f525a !important;
}

.on-focus-mode li[cid]:not(.md-focus-container) {
  color: #4f525a;
}

.on-focus-mode
  .md-fences.md-focus
  .CodeMirror-code
  > *:not(.CodeMirror-activeline)
  *,
.on-focus-mode .CodeMirror.cm-s-inner:not(.CodeMirror-focused) * {
  color: #4f525a !important;
}

.on-focus-mode .md-focus,
.on-focus-mode .md-focus-container {
  color: var(--light-header-color);
}

.on-focus-mode
  #typora-source
  .CodeMirror-code
  > *:not(.CodeMirror-activeline)
  * {
  color: #4f525a !important;
}

strong::before {
  content: '「';
}

strong {
  color: #3594F7;
  font-weight: bold;
}

strong::after {
  content: '」';
}

code{
  color: #3594F7;
  background: RGBA(59, 170, 250, .1);
  display:inline-block;
  padding:0 2px;
  border-radius:2px;
  height:21px;
  line-height:22px;
}

hr {
  height: 1px;
  padding: 0;
  border: none;
  border-top: 2px solid #3BAAFA;
}



blockquote{
  margin: 10px 5px;
  border-left: 3px solid #3BAAFA;
  border-right: 1px solid #3BAAFA;
  color: rgb(120, 124, 136);
  quotes: none;
  padding-left: 2ch;
  padding-right: 2ch;
}

